package cn.iocoder.yudao.module.security.service.dashboard;

import co.elastic.clients.elasticsearch._types.FieldValue;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class SecurityCommonService {

    public List<FieldValue> buildProtocolType() {
        List<FieldValue> list = new ArrayList<>();
        {
            FieldValue s7COMM = FieldValue.of("S7COMM");
            FieldValue dnp3 = FieldValue.of("DNP3");
            FieldValue modbus = FieldValue.of("MODBUS");
            FieldValue iec104 = FieldValue.of("IEC104");
            FieldValue profinet = FieldValue.of("PROFINET");
            list.add(s7COMM);
            list.add(dnp3);
            list.add(modbus);
            list.add(iec104);
            list.add(profinet);
        }
        return list;
    }

    public List<FieldValue> buildEventType() {
        List<FieldValue> eventTypeList = new ArrayList<>();
        {
            FieldValue fieldValue1 = FieldValue.of("协议规约告警");
            FieldValue fieldValue2 = FieldValue.of("协议审计日志");
            FieldValue fieldValue3 = FieldValue.of("关键事件告警");
            FieldValue fieldValue4 = FieldValue.of("白名单告警");
            eventTypeList.add(fieldValue1);
            eventTypeList.add(fieldValue2);
            eventTypeList.add(fieldValue3);
            eventTypeList.add(fieldValue4);
        }
        return eventTypeList;
    }

}
